-
Notifications
You must be signed in to change notification settings - Fork 2
[fmt] match Omicron rust formatting for consistency + edition 2024 #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
FelixMcFelix
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks to generally condense things overall. I'm happy with it since it matches the decisions we've made in other repos.
I did attempt to verify the change on my Macbook to some extent:
kyle@Mac dendrite % git diff
kyle@Mac dendrite % git diff origin/zl/match-omicron-fmt-edition --stat
asic/src/chaos/mod.rs | 10 ++++++++--
asic/src/chaos/table.rs | 5 ++++-
asic/src/lib.rs | 5 ++++-
asic/src/softnpu/mgmt.rs | 7 +++++--
asic/src/softnpu/mod.rs | 30 ++++++++++++++++++++++--------
asic/src/softnpu/table.rs | 6 +++++-
asic/src/tofino_asic/bf_wrapper.rs | 23 ++++++++++++++++++-----
asic/src/tofino_asic/link_fsm.rs | 6 +++++-
asic/src/tofino_asic/mcast.rs | 16 +++++++++++++---
asic/src/tofino_asic/mod.rs | 18 +++++++++++++++---
asic/src/tofino_asic/ports.rs | 41 ++++++++++++++++++++++++++++++++---------
asic/src/tofino_asic/qsfp.rs | 30 +++++++++++++++++++++++++-----
asic/src/tofino_asic/serdes.rs | 27 +++++++++++++++++++++------
asic/src/tofino_asic/table.rs | 43 ++++++++++++++++++++++++++++++++-----------
asic/src/tofino_common/mod.rs | 7 ++++++-
asic/src/tofino_stub/mcast.rs | 4 +++-
asic/src/tofino_stub/mod.rs | 5 ++++-
asic/src/tofino_stub/ports.rs | 22 ++++++++++++++++++----
pcap/src/lib.rs | 10 +++++++---
19 files changed, 247 insertions(+), 68 deletions(-)
kyle@Mac dendrite % cargo fmt --check
Error writing files: failed to resolve mod `genpd`: /Users/kyle/gits/dendrite/asic/src/tofino_asic/genpd.rs does not exist
Error writing files: failed to resolve mod `ffi`: /Users/kyle/gits/dendrite/pcap/src/ffi.rs does not exist
kyle@Mac dendrite %So I have some divergence, but that lines up with some of the modules just not playing well on this platform. The diff itself does just look like, as reported, cargo fmt has bailed on those modules for me.
|
@FelixMcFelix I can't ignore those generated files, and it seems to be OSX only, as they can't build. |
I don't think this has to be fixed here; it will have always been the case, I'd think? So long as there's an issue tracking then I think this PR does what it set out to. |
My editor complains when using 2024 edition enhancements, even though the min version here is Rust 1.90.
This PR aligns us with Omicron's formatting style (and edition).